package com.yc.common.core.domain.entity;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serial;
import java.io.Serializable;
import java.util.Set;


@Setter
@Getter
public class SysRole implements Serializable {

    @Serial
    private static final long serialVersionUID = -6722774530567483928L;

    /**
     * 角色ID
     */
    private Long roleId;

    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 数据范围（1：所有数据权限；2：自定义数据权限；3：本部门数据权限；4：本部门及以下数据权限；5：仅本人数据权限）
     */
    private String dataScope;

    /**
     * 角色状态（0正常 1停用）
     */
    private Integer status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private Integer isDeleted;


    public SysRole() {
    }

    public SysRole(Long roleId) {
        this.roleId = roleId;
    }

    public SysRole(Long roleId, String roleName, Integer status, Integer isDeleted, String dataScope) {
        this.roleId = roleId;
        this.roleName = roleName;
        this.status = status;
        this.isDeleted = isDeleted;
        this.dataScope = dataScope;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
                .append("roleId", getRoleId())
                .append("roleName", getRoleName())
                .append("dataScope", getDataScope())
                .append("status", getStatus())
                .append("isDeleted", getIsDeleted())
                .toString();
    }
}
